package com.app.utils.impl.labour;

import android.annotation.SuppressLint;

import com.app.utils.impl.IConsole;
import com.app.utils.impl.Strategy;
import com.zndroid.utils.XUtils;
import com.zndroid.utils.impl.DeviceUtil;

/**
 * Created by lzy on 2022/2/21.
 */
public class DeviceUtilStrategy extends Strategy {
    public DeviceUtilStrategy(IConsole iConsole) {
        super(iConsole);
    }

    @SuppressLint("MissingPermission")
    @Override
    public void doing() {
        DeviceUtil util = XUtils.create().deviceUtil();

        String[] abs = util.getABIs();
        StringBuilder sb = new StringBuilder();
        for (String it : abs) {
            sb.append(it).append(" ");
        }
        iConsole.console("getABIs", sb.toString());
        iConsole.console("getBuildId", util.getBuildId());
        iConsole.console("getDeviceBrand", util.getDeviceBrand());
        iConsole.console("getDeviceName", util.getDeviceName());
        iConsole.console("getDeviceNameByUser", util.getDeviceNameByUser(XUtils.getContext()));
        iConsole.console("getDeviceHost", util.getDeviceHost());
        iConsole.console("getDeviceManufacturer", util.getDeviceManufacturer());
        iConsole.console("getEMUIVersionName", util.getEMUIVersionName());
        iConsole.console("getFlymeVersionName", util.getFlymeVersionName());
        iConsole.console("getHardWare", util.getHardWare());
        iConsole.console("getHarmonyOsName", util.getHarmonyOsName());
        iConsole.console("getHarmonyOsVersion", util.getHarmonyOsVersion());
        iConsole.console("isPhone", util.isPhone() + "");
        iConsole.console("isSimCardReady", util.isSimCardReady() + "");
        iConsole.console("isTablet", util.isTablet(XUtils.getContext()) + "");
        iConsole.console("isHuawei", util.isHuawei() + "");
        iConsole.console("getMIUIVersionName", util.getMIUIVersionName());
        iConsole.console("getPhoneType", util.getPhoneType() + "");
        iConsole.console("getSystemLanguage", util.getSystemLanguage());
        iConsole.console("getSystemModel", util.getSystemModel());
        iConsole.console("getSystemVersionInt", util.getSystemVersionInt() + "");
        iConsole.console("getSystemVersion", util.getSystemVersion());
        iConsole.console("getSimOperatorName", util.getSimOperatorName());
        iConsole.console("getSimOperatorByMnc", util.getSimOperatorByMnc());
        iConsole.console("getSerialNumber(‘IMEI、DeviceID、AndroidID’)", util.getSerialNumber(XUtils.getContext()));
    }
}
